package com.zhai.boot.domain.in;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.util.List;

/**
 * @package: com.zhai.boot.domain.in
 * @project-name: zhai-boot
 * @description: zhai 入参
 * @author: Created by 翟凤玺
 * @create-datetime: 2018-8-7 14:10
 */
@Data
public class ZhaiSaveIn {

    @NotBlank(message = "姓名不能为空")
    @ApiModelProperty(value = "姓名")
    private String name;

    @ApiModelProperty(value = "年龄")
    private Integer age;

    @ApiModelProperty(value = "爱好")
    private List<@Pattern(regexp="(EAT)|(喝)", message = "爱好类型有误") String> hobby;

    @JsonProperty(value = "package")
    private String pak;
}
